/**
 * @properties={type:6,typeid:36,uuid:"8551378F-0BA9-4A5C-A6D6-35BC18BE7C76"}
 */
function residual_cons()
{
	if (globals.gmoneda_consulta  == 1)
		return valor_pes - (amo_acu_pes + amo_eje_pes)
	return	valor_dol - (amo_acu_dol + amo_eje_dol)
}

/**
 * @properties={type:4,typeid:36,uuid:"F63F2A66-3DD7-4AC2-B121-C45BA8D25745"}
 */
function meses_rest()
{
	if (meses_trans != null)
	{
		var vida = cta_bien_to_bienes.bienes_to_tipos.vida*12
		var res = vida - meses_trans
		if (res > 0)
			return res;	
	}
	return 0
}

/**
 * @properties={type:4,typeid:36,uuid:"E1E99C66-FDEB-4D79-A76D-44E1DE2FA19B"}
 */
function meses_trans()
{
	var trans = (anio - cta_bien_to_bienes.anio_alta) * 12 + (mes - cta_bien_to_bienes.mes_alta )
	var vida = cta_bien_to_bienes.bienes_to_tipos.vida*12
	if (trans > vida)
		return vida;
	return trans
}

/**
 * @properties={type:6,typeid:36,uuid:"70857323-6352-4AE5-B7A2-226779612D87"}
 */
function amor_acum_cons()
{
	if (globals.gmoneda_consulta  == 1)
		return amo_acu_pes;
	return amo_acu_dol
}

/**
 * @properties={type:6,typeid:36,uuid:"B48CD629-2BBC-417E-97E3-1D8B5F1D2F03"}
 */
function amor_ej_cons()
{
	if (globals.gmoneda_consulta  == 1)
		return amo_eje_pes;
	return amo_eje_dol
}

/**
 * @properties={type:6,typeid:36,uuid:"7E9001FC-296E-4BEB-82D9-86C392B773AD"}
 */
function coef_cons()
{
	if (globals.gmoneda_consulta  == 1)
		return coef_pes;
	return coef_dol
}

/**
 * @properties={type:6,typeid:36,uuid:"0B63B0F9-6A9A-4A9F-9DA3-F93215A7633C"}
 */
function reval_amor_acum_cons()
{
	if (globals.gmoneda_consulta  == 1)
		return rev_acu_pes;
	return rev_acu_dol
}

/**
 * @properties={type:6,typeid:36,uuid:"49BE008D-413B-4579-8B4E-8EB5D06CF43B"}
 */
function reval_amor_ej_cons()
{
	if (globals.gmoneda_consulta  == 1)
		return rev_eje_acu;
	return rev_eje_dol
}

/**
 * @properties={type:6,typeid:36,uuid:"3A72781B-D22B-4987-8F4E-277C1B08A53B"}
 */
function reval_orig_cons()
{
	if (globals.gmoneda_consulta  == 1)
		return valres_pes - (rev_acu_pes + rev_eje_acu)
	return	valres_dol - (rev_acu_dol + rev_eje_dol)
}

/**
 * @properties={type:6,typeid:36,uuid:"03AFE9E1-3D47-4BCC-AC65-D8B106F5BDB1"}
 */
function val_origen_cons()
{
	if (globals.gmoneda_consulta  == 1)
		return valor_pes;
	return valor_dol
}

/**
 * @properties={type:6,typeid:36,uuid:"B17749BC-D1E8-4380-8959-6A4F0164E284"}
 */
function val_res_cons()
{
	if (globals.gmoneda_consulta  == 1)
		return valres_pes;
	return valres_dol
}
